<!doctype html>
<!--
Copyright 2017 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<html>
<head>
  <title>Trivial Animation</title>
</head>
<body>
  <!-- The image is a 625 × 831 dark gray rect. -->
  <img id="the_image" src="" />
</body>
<script>
  var image = null;
  var offset = 0;

  function init() {
    image = document.getElementById('the_image');
    image.style.position = 'relative';
    image.style.left = '0px';
    animate();
  }

  function animate() {
    offset++;
    if (offset > 500) {
      offset = 0;
    }
    image.style.left = offset + 'px';

    // Move the image 1pt every 16ms.
    setTimeout(animate, 16);
  }

  window.onload = init;
</script>
</html>
